
using AutoMapper;
using Ixyu.Helper;
using Ixyu.Work;
using Ixyu.Work.Dtos;

namespace Ixyu.Work.Mapper
{

	/// <summary>
    /// 配置WorkItem的AutoMapper
    /// </summary>
	internal static class WorkItemMapper
    {
        public static void CreateMappings(IMapperConfigurationExpression configuration)
        {
            configuration.CreateMap <WorkItem,WorkItemListDto>();
            configuration.CreateMap <WorkItemListDto,WorkItem>();

            configuration.CreateMap <WorkItemEditDto,WorkItem>().ForMember(u=>u.Files,o=>o.Ignore());
            configuration.CreateMap<WorkItem, WorkItemEditDto>().ForMember(u=>u.FileList,o=>o.Ignore());

        }
	}
}
